import { add, sub, mul, division } from '../../utils/Math';
class Vector2 {
  x: number;
  y: number;
  constructor(x: number, y: number) {
    this.x = x;
    this.y = y;
  }
  add(vec: Vector2) {
    return new Vector2(add(this.x, vec.x), add(this.y, vec.y));
  }
  sub(vec: Vector2) {
    return new Vector2(sub(this.x, vec.x), sub(this.y, vec.y));
  }
  mul(vec: Vector2) {
    return new Vector2(mul(this.x, vec.x), mul(this.y, vec.y));
  }
  division(vec: Vector2) {
    return new Vector2(division(this.x, vec.x), division(this.y, vec.y));
  }
}

export default Vector2;
